package com.zhiliao.vms.constant;

/**
 * @author 枫叶
 * @date 2020/10/23
 * <p>
 *     用户状态常量枚举，存储用户登录和注册中可能存在的状态。
 * </p>
 */
public enum  UserConstant {
    SUCCESS(20000,"成功！"),
    USER_EXIST(40001,"用户已被注册"),
    NO_SUCH_USER(40002,"用户不存在"),
    PASSWORD_ERROR(40003,"密码错误"),
    ANSWER_ERROR(40004,"答案错误"),
    ERROR(4099,"未知错误")
    ;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * 状态码
     */
    private int code;
    /**
     * 消息
     */
    private String msg;

    UserConstant(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
